<?php
//
ob_start();
session_start();
include "checksession.php";
$id_member = $_SESSION["id_member"];
include_once ("../connect.php");

$strSQL = "SELECT * FROM employee
                    JOIN depart ON employee.de_id = depart.id
                    JOIN mail  ON employee.emp_id = mail.emp_id
           WHERE employee.emp_id = '$id_member'
                                            ";
$objQuery = mysql_query($strSQL);
$objResult = mysql_fetch_array($objQuery);
?>

<script language="javascript">
    function CheckValidate()
    {
        if (eval("document.frmMain.txtError.value") == "") {
            alert("กรุณากรอกช่อง รายละเอียด");
            eval("document.frmMain.txtError.focus();")
            return false;
        }
    }
</script>
<link type="text/css" href="../css/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script src="../js/jquery/jquery-1.4.3.min.js" type="text/javascript"></script>
<script type="text/javascript" src="../js/jquery/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="../js/jquery/timepicker.js"></script>
<!--<script src="../js/jquery/ui/jquery-ui.js"></script>-->
<script type="text/javascript">
    $(function() {
        $('#requiteDatetime').datepicker({
            duration: '',
            showTime: true,
            constrainInput: false
        });
    });
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Adinop Co., Ltd. was founded as an ingredients importer and local manufacturers’ distributor in 1986. We also function as an exporter of finished products</title>
        <link rel="stylesheet" href="../css/style.css"/>
    </head>
    <body>
        <div align="center">
            <fieldset>
                <legend class="nameTitle">ลงทะเบียน ใบคำขอออกแบบงานกราฟิก</legend>
                <form  
                    method="Post"
                    action="AddaltGraphicSave.php"
                    enctype="multipart/form-data"
                    name ="frmMain" id="frmMain" OnSubmit="return CheckValidate();" />
                <table class="inputcontenttable"><br />

                    <tr align="top">
                        <td>รหัสพนักงาน</td>
                        <td><input  id="txtEmpid" name="txtEmpid" type="text" value="<?= $objResult[emp_id] ?>" readonly/></td> 
                        <td width="50px"></td>
                        <td>ผู้แจ้ง</td>
                        <td><input id="txtNameEng" name="txtNameTha" type="text" value="<?= $objResult[emp_nameTh] ?>"readonly/></td>      
                    </tr>
                    <tr valign="top" >

                        <td>แผนกฝ่าย</td>
                        <td><input id="txtDepartment"  name="txtDepartment" type="text" value="<?= $objResult[departname] ?>" readonly/></td>  
                        <td width="50px"></td>
                        <td>วันที่ต้องการ</td>
                        <td><input id="requiteDatetime"  name="txtrequiteDatetime" type="text"/></td>
                    </tr>
                    <tr valign="top" >

                        <td>จำนวนที่ต้องการออกแบบให้</td>
                        <td><input id="txtCount"  name="txtCount" type="text"/></td>  
                        <td width="50px"></td>
                        <td>ไฟล์แนบ</td>
                        <td><input id="txtFile"  name="txtFile" type="file"/></td>
                    </tr>
                    <tr valign="top" >
                        <td>Project Name :</td>
                        <td colspan="4"><input id="txtProject"  name="txtProject" type="text"/></td>  
                    </tr>
                    <tr>
                        <td>รายละเอียด</td>
                        <td colspan="4"><textarea id="txtDetails" rows="4" cols="50" name="txtDetails" style="width: 445px"></textarea></td> 
                    </tr>

                    <tr>
                        <td colspan="5" align="center"><input  type="submit" name="Submit" value="Save" style="height: 30px; width: 120px"/></td>
                    </tr>     
                    <input type="hidden" name="grpId"/>
                    <input type="hidden" name="mail" value="<?= $objResult[mail_coth] ?>"/>
                    <input type="hidden" name="txtsername" value="<?= $objResult[emp_surnameTh] ?>"/>
                    <input type="hidden" name="txtde_id" value="<?= $objResult[de_id] ?>"/>
                    </form>
                </table>
            </fieldset>
        </div>
    </body>
</html>
